const app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    
  },
  
  // 跳转到我的订单
  toMyOrder: function (e) {
    // let id = e.currentTarget.id
       let orderStatus = e.currentTarget.id
    wx.navigateTo({
         url: '../my-order/my-order?orderStatus=' + orderStatus
    })
  },

  // 跳转到礼品卡
  toGiftCard: function (e) {
    // let id = e.currentTarget.id
    wx.navigateTo({
      url: '../gift-card/gift-card'
    })
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
       this.loadMember()
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    
  },
  loadMember:function(){
       let that = this
       var data = { "memberId": app.globalData.userInfo.id }
       var promise = app.synPostData('member/findOne', data)
       promise.then(function (res) {
            that.setData({
                 member: res.data.result
            })
       });
  }


 

 
})